#include "Light.h"

Light::Light()
{
  lightPos[0] = 320.0; lightPos[1] = 240.0; lightPos[2] = 50.0; lightPos[3] = 1;
  lightAmbient[0] = 0.8; lightAmbient[1] = 0.8; lightAmbient[2] = 0.8; lightAmbient[3] = 0.0;
  lightDiffuse[0] = 1.0; lightDiffuse[1] = 1.0; lightDiffuse[2] = 1.0; lightDiffuse[3] = 1.0;
  lightSpecular[0] = 1.0; lightSpecular[1] = 1.0; lightSpecular[2] = 1.0; lightSpecular[3] = 1.0;            
}

void Light::setup()
{
  glEnable(GL_LIGHT0);
  
  glLightfv(GL_LIGHT0, GL_AMBIENT,  lightAmbient);
  glLightfv(GL_LIGHT0, GL_DIFFUSE,  lightDiffuse);
  glLightfv(GL_LIGHT0, GL_SPECULAR, lightSpecular);
  glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
}
